<div id="header"><p>iRoomMonitor Help</p></div>
<?php

// First, get the params from referal page
$page = get_page_of_params($_SERVER['HTTP_REFERER']);

// Default message
$output = "<p>Help is not available for this page</p>";

// If there are params and the 'p' param is set
if($page !== false && isset($page))
{
	// Determine the output based on the page previously viewed
	switch($page)
	{
		case "home":
			$output = "<p>The <b>Home</b> page provides basic information about iRoomMonitor.  In addition to a
				brief overview of iRoomMonitor, you can also view recent news relevant to the 
				iRoomMonitor experience using the news reader.</p>";	
			break;
		case "help":
			$output = "<p>The Help page provides a helpful description about the page you were viewing</p>";
			break;
		case "recentdata":
			$output = '
				<p><b>Your Room</b> provides you with the most up-to-date information regarding your room. Also, it provides you with
				recent historical information.</p><p>Use the drop
				box at the top of the page to select the sensor you want to view, and hit select.
				The information will be displayed below.</p>';
			break;
		case "sensormanagement":
			$output = '
				<p>The <b>Your Sensors</b> page lets you view and manage the properties of your
				sensors.  To rename a sensor or sensors, simply type in a new name in the "Name: 
				fields for the sensors you want to rename, and hit "Apply" to apply the new names.</p>
				<p>The current battery level for each sensor is displayed as meter to the right of
				each sensor\'s name.</p>
				';
			break;
		case "timeforms":
			$output = '
				<p>The <b>Your History</b> page allows you to view data on a room over a given time interval.
				Use the dropbox at the top of the page to select the sensor you want to view.  Click on any of 
				the times you wish to change and a calendar or time selector will pop up.  Alternatively, you
				can continue typing the time or date manually.  Hit "Fetch" to retrieve a table of all the data 
				between the	two specified times.</p>
				';
			break;
		case "settings":
				$output= '<p>The <b>Your Settings</b> page allows you to customize alert options.  At the moment, only SMS (texting) alerts are available.
					Simply input your phone number (including area code) and select your service provider.  Click the "Add" button to register
					your phone with the iRoomMonitor SMS alert system.</p> <p>If you wish to unregister your phone number, simply enter your information again
					and click the "Remove" button.</p>';
			break;
		case "privacy":
			$output = "<p>iRoomMonitor's privacy policy is not available</p>";
			break;
			
	}	
}
// Spit out the output
echo $output;

?>
